<template>
  <div class="authLogin">
    正在跳转中...
  </div>
</template>

<script setup lang="ts">
import {ref} from 'vue'
import {useRoute, useRouter} from "vue-router";
import {rxOldLoginReq} from "@/api/login";
import useUserStore from "@/store/modules/user/user";

let route = useRoute()
let router = useRouter()
let token: string = route.query.token as string
let userStore = useUserStore()
window.localStorage.setItem('from', 'old')
const useRxOldLoginReq = async () => {
  let res = await userStore.rxOldLogin({token: token})
  router.push('/home')
}
useRxOldLoginReq()


</script>

<style scoped lang="scss">
.authLogin {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 25px;
  font-weight: bold;
}
</style>
